﻿using BusinessLogicLayer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PresentationLayer
{
    public partial class dialogTaiDanhDSTangCa : Form
    {
        HienThiDanhSachTangCa hienthi;
        public dialogTaiDanhDSTangCa(HienThiDanhSachTangCa hienthi)
        {
            InitializeComponent();
            this.hienthi = hienthi;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            List<TangCa> list = null;
            if (rdAll.Checked == true)
            {
                list = new TangCaManager().LayDanhSachTangCa().ObjectList;
            }
            else
            {
                list = new TangCaManager().LayDanhSachTangCaHienHanh().ObjectList;
            }
            hienthi(list);
            Close();
        }
    }
}
